import pino from 'pino'
import pretty from 'pino-pretty'
export async function createLogger(name: string = 'app') {
    const level = process.env.LOG_LEVEL || 'info'
    return pino({
        name,
        level: level
    }, pretty())
}

export type Logger = pino.Logger;